package cn.gson.crmdemo.model.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.gson.crmdemo.model.dao.ReturnDao;
import cn.gson.crmdemo.model.dao.ReturnsdetailedDao;
import cn.gson.crmdemo.model.vo.ReturndetailedReturnProductVo;
import cn.gson.crmdemo.model.vo.ReturneCustomerOrderVo;

@Service
@Transactional(rollbackFor=Exception.class)
public class ReturnService {
	@Autowired
	ReturnDao rd;
	@Autowired
	ReturnsdetailedDao rdd;
	
	/**
	 * 添加退货单
	 * @param r
	 */
	public void addReturn(ReturneCustomerOrderVo r) {
		rd.save(r);
	}
	
	
	
	/**
	 * 添加退货祥单
	 * @param r
	 */
	public void addReturndetailed(ReturndetailedReturnProductVo r) {
		rdd.save(r);
	}
	
	
	
}
